package org.lucava.boatskeeper.client.event.boat;

import com.google.gwt.event.shared.GwtEvent;

public class EditBoatEvent extends GwtEvent<EditBoatEventHandler> {
	public static Type<EditBoatEventHandler> TYPE = new Type<EditBoatEventHandler>();
	private final Integer id;

	public EditBoatEvent(Integer id) {
		this.id = id;
	}

	public Integer getId() {
		return id;
	}

	@Override
	public Type<EditBoatEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(EditBoatEventHandler handler) {
		handler.onEditBoat(this);
	}
}
